<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
    <h4 class="modal-title" id="myModalLabel">添加用户</h4>
</div>
<form class="form-horizontal J_ajaxForm" role="form" method="post" action="../Test/user/addUserSuccess" data-validate="validate">
    <div class="modal-body">
        <div class="form-group">
            <label class="col-sm-3 control-label">用户账号</label>
            <div class="col-sm-6">
                <input type="text" class="form-control" placeholder="用户账号" name="username">
                <!-- <p class="help-block">必填</p> -->
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">用户密码</label>
            <div class="col-sm-6">
                <input type="text" class="form-control" placeholder="用户密码" name="password">
                <!-- <p class="help-block">必填</p> -->
            </div>
        </div>
        
        <div class="form-group">
          <label class="col-sm-3 control-label">用户名称</label>
	          <div class="col-sm-6">
	          	  <input type="text" class="form-control" placeholder="用户名称" name="realname">
	          </div>
        </div>
        
        <div class="form-group">
          <label class="col-sm-3 control-label">用户电话</label>
	          <div class="col-sm-6">
	          	<input type="text" class="form-control" placeholder="用户名称" name="realname">
	          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">用户邮件</label>
	          <div class="col-sm-6">
	          	<input type="text" class="form-control" placeholder="用户邮件" name="email">
	          </div>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary J_ajaxSubmitBtn">提交</button>
    </div>
</form>
</body>
<script>
    function validate($from) {
        var title = $from.find('input[name="username"]');
        if ($.trim(title.val()) == '') {
            return '用户名称不能为空！';
        }
        return true;
    }
</script>
</html>